package cn.edu.scau.cmi.dengzejun.chapter07;

public class Example7_3 {
	public static void main(String ages[]) {
		ComputerAverage computer=new ComputerAverageA();
		double a=11.23,b=22.78;
		double result=computer.average(a, b);
		System.out.printf("%5.2f and %5.2f arithmetic average is %5.2f\n", a,b,result);
		computer=new ComputerAverageB();
		result=computer.average(a, b);
		System.out.printf("%5.2f and %5.2f geometric average is %5.2f\n",a,b,result);
		return;
	}
}
